<?php 

class Ext_Blog_Show
{
    public $blogId;
    public $author;
    public $name;
    public $url;
    
    public function __construct($blogId)
    {
        $this->_build($blogId);
    }
    
    public function _build($blogId)
    {
        $blogRow = App_Model_DbTable_Blog::getInstance()->getRowById($blogId);
        if(!$blogRow)
        {
            return "";
        }

        $this->blogId   = $blogId;
        $this->author   = new Ext_User_Show($blogRow['userId']);;
        $this->name     = $blogRow['blogName'];
        $this->url      = Ext_Url::getInstance()->blog($blogRow['id']);
    }

}